<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

function debug($param, $vardump = FALSE) {
    echo '<pre><code>';
    if ($vardump) {
        var_dump($param);
    } else {
        print_r($param);
    }
    echo '</code></pre>';
}

function image_holder($sizeW_sizeH_backgroundColor_textColor, $random_height = false){
    if($random_height){
        $arr_data = explode('-', $sizeW_sizeH_backgroundColor_textColor);
        foreach ($arr_data as $key=>$value){
            if($key==1){
                $arr_data[$key] = rand(100, 350);
            }
        }
        $sizeW_sizeH_backgroundColor_textColor = implode('-', $arr_data);
    }
    return base_url('placeholder/?id='.$sizeW_sizeH_backgroundColor_textColor);
}

